<?php
/**
 * 定时任务抽象处理类
 *
 * @author kamisama.xia@gmail.com
 * @version 0.1
 */

class taskmgr_task_timer extends taskmgr_task_abstract {

    protected $_gctime = 3600;

    /**
     * 记录请求日志
     *
     * @param array $content
     * @param array $response
     * @return null
     */
    public function writeLog($content, $response){

        $_tmp=parse_url($content['url']);  
        $domain = $_tmp['host'];

        $flag = isset($content['data'][$this->_process_id]) ? $content['data'][$this->_process_id] : 'trigger '.$this->_taskName.' task';

        $info = sprintf("%s\t%s\t%s", $domain, $flag, $response['code']);
        taskmgr_log::log($this->_taskName,$info);
    }
}